home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Source / GNU / bison / Makefile.in < prev    next >
Makefile  |  1994-03-11  |  6KB  |  189 lines

  1. # Makefile for bison
  2. # Copyright (C) 1988, 1989, 1991, 1993 Bob Corbett and Free Software Foundation, Inc.
  3. # This file is part of Bison, the GNU Compiler Compiler.
  4. # Bison is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8. # Bison is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with Bison; see the file COPYING.  If not, write to
  14. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  15.  
  16. #### Start of system configuration section. ####
  17.  
  18. srcdir = @srcdir@
  19. VPATH = @srcdir@
  20.  
  21. CC = @CC@
  22. INSTALL = @INSTALL@
  23. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  24. INSTALL_DATA = @INSTALL_DATA@
  25. MAKEINFO = makeinfo
  26.  
  27. # Things you might add to DEFS:
  28. # -DSTDC_HEADERS    If you have ANSI C headers and libraries.
  29. # -DHAVE_STRING_H    If you don't have ANSI C headers but have string.h.
  30. # -DHAVE_MEMORY_H    If you don't have ANSI C headers and have memory.h.
  31. # -DHAVE_STRERROR    If you have strerror function.
  32. DEFS = @DEFS@
  33.  
  34. CFLAGS = -g
  35. LDFLAGS = -g
  36.  
  37. LIBS = @LIBS@
  38.  
  39. # Some System V machines do not come with libPW.  If this is true, use
  40. # the GNU alloca.o here.
  41. ALLOCA = @ALLOCA@
  42.  
  43. prefix = /usr/local
  44. exec_prefix = $(prefix)
  45.  
  46. # where the installed binary goes
  47. bindir = $(exec_prefix)/bin
  48.  
  49. # where the parsers go
  50. datadir = $(prefix)/lib
  51.  
  52. # where the info files go
  53. infodir = $(prefix)/info
  54.  
  55. # where manual pages go and what their extensions should be
  56. mandir = $(prefix)/man/man$(manext)
  57. manext = 1
  58.  
  59. #### End of system configuration section. ####
  60.  
  61. DISTFILES = COPYING ChangeLog Makefile.in configure configure.in \
  62.     REFERENCES bison.1 bison.rnh configure.bat \
  63.     bison.simple bison.hairy \
  64.     LR0.c allocate.c closure.c conflicts.c derives.c \
  65.     files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
  66.     output.c print.c reader.c reduce.c symtab.c version.c \
  67.     warshall.c files.h gram.h lex.h machine.h new.h state.h \
  68.     symtab.h system.h types.h bison.cld build.com vmsgetargs.c \
  69.     vmshlp.mar README INSTALL bison.texinfo bison.info* texinfo.tex \
  70.     getopt.c getopt.h getopt1.c alloca.c mkinstalldirs
  71.  
  72.  
  73. SHELL = /bin/sh
  74.  
  75. # This rule allows us to supply the necessary -D options
  76. # in addition to whatever the user asks for.
  77. .c.o:
  78.     $(CC) -c $(DEFS) -I$(srcdir)/../include $(CPPFLAGS) $(CFLAGS) $<
  79.  
  80. # names of parser files
  81. PFILE = bison.simple
  82. PFILE1 = bison.hairy
  83.  
  84. PFILES = -DXPFILE=\"$(datadir)/$(PFILE)\" \
  85.      -DXPFILE1=\"$(datadir)/$(PFILE1)\"
  86.  
  87. OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o    \
  88.       getargs.o gram.o lalr.o lex.o                    \
  89.       main.o nullable.o output.o print.o reader.o reduce.o symtab.o    \
  90.       warshall.o version.o                        \
  91.       getopt.o getopt1.o $(ALLOCA)
  92.  
  93. all: bison bison.s1
  94.  
  95. Makefile: Makefile.in config.status
  96.     ./config.status
  97.  
  98. config.status: configure
  99.     ./config.status --recheck
  100.  
  101. configure: configure.in
  102.     cd $(srcdir); autoconf
  103.  
  104. # Copy bison.simple, inserting directory name into the #line commands.
  105. bison.s1: bison.simple
  106.     -rm -f bison.s1
  107.     sed -e "/^#line/ s|bison|$(datadir)/bison|" < $(srcdir)/$(PFILE) > bison.s1
  108.  
  109. clean:
  110.     rm -f *.o core bison bison.s1
  111.  
  112. mostlyclean: clean
  113.  
  114. distclean: clean
  115.     rm -f Makefile config.status
  116.  
  117. realclean: distclean
  118.     rm -f TAGS *.info*
  119.  
  120. # Most of these deps are in case using RCS.
  121. install: all bison.1 $(srcdir)/$(PFILE) $(srcdir)/$(PFILE1) installdirs uninstall
  122.     $(INSTALL_PROGRAM) bison $(bindir)/bison
  123.     $(INSTALL_DATA) ./bison.s1 $(datadir)/$(PFILE)
  124.     $(INSTALL_DATA) $(srcdir)/$(PFILE1) $(datadir)/$(PFILE1)
  125.     -chmod a+r $(datadir)/$(PFILE) $(datadir)/$(PFILE1) 
  126.     -$(INSTALL_DATA) $(srcdir)/bison.1 $(mandir)/bison.$(manext)
  127.     -chmod a+r $(mandir)/bison.$(manext)
  128.  
  129. #    cd $(srcdir); for f in bison.info*; \
  130. #    do $(INSTALL_DATA) $$f $(infodir)/$$f; done
  131.  
  132. # Make sure all installation directories, e.g. $(bindir) actually exist by
  133. # making them if necessary.
  134. installdirs:
  135.     -sh $(srcdir)/mkinstalldirs $(bindir) $(datadir) $(libdir) $(infodir) $(mandir)
  136.  
  137. uninstall:
  138.     rm -f $(bindir)/bison
  139.     -rm -f $(datadir)/$(PFILE) $(datadir)/$(PFILE1)
  140.     rm -f $(mandir)/bison.$(manext) $(infodir)/bison.info*
  141.  
  142. bison: $(OBJECTS)
  143.     $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
  144.  
  145. dist: bison.info
  146.     echo bison-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
  147.     -rm -rf `cat .fname`
  148.     mkdir `cat .fname`
  149.     dst=`cat .fname`; for f in $(DISTFILES); do \
  150.        ln $(srcdir)/$$f $$dst/$$f || { echo copying $$f; cp -p $(srcdir)/$$f $$dst/$$f ; } \
  151.     done
  152.     tar --gzip -chf `cat .fname`.tar.gz `cat .fname`
  153.     -rm -rf `cat .fname` .fname
  154.  
  155. bison.info: bison.texinfo
  156.     $(MAKEINFO) $(srcdir)/bison.texinfo
  157.  
  158. TAGS: *.c *.h
  159.     etags *.c *.h
  160.  
  161. # This file is different to pass the parser file names to the compiler.
  162. files.o: files.c
  163.     $(CC) -c $(PFILES) $(DEFS) $(CPPFLAGS) $(CFLAGS) \
  164.        $(srcdir)/files.c $(OUTPUT_OPTION)
  165.  
  166. LR0.o: system.h machine.h new.h gram.h state.h
  167. closure.o: system.h machine.h new.h gram.h
  168. conflicts.o: system.h machine.h new.h files.h gram.h state.h
  169. derives.o: system.h new.h types.h gram.h
  170. files.o: system.h files.h new.h gram.h
  171. getargs.o: system.h files.h
  172. lalr.o: system.h machine.h types.h state.h new.h gram.h
  173. lex.o: system.h files.h symtab.h lex.h
  174. main.o: system.h machine.h
  175. nullable.o: system.h types.h gram.h new.h
  176. output.o: system.h machine.h new.h files.h gram.h state.h
  177. print.o: system.h machine.h new.h files.h gram.h state.h
  178. reader.o: system.h files.h new.h symtab.h lex.h gram.h
  179. reduce.o: system.h machine.h files.h new.h gram.h
  180. symtab.o: system.h new.h symtab.h gram.h
  181. warshall.o: system.h machine.h
  182.  
  183. # Prevent GNU make v3 from overflowing arg limit on SysV.
  184. .NOEXPORT:
  185.